<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <style>
        td{
            line-height: 33px !important;
        }
    </style>
</head>
<body>
    <a  class="btn btn-success pull-right" href="${pageContext.request.contextPath}/ToAddStudentServlet">添加</a>
    <table class="table table-striped table-bordered table-hover">
        <tr class="success">
            <td style="width: 100px;">序号</td>
            <td>学号</td>
            <td>姓名</td>
            <td>年龄</td>
            <td style="width: 150px;">操作</td>
        </tr>

        <c:forEach items="${STUDENTS}" var="stu" varStatus="vs">
            <tr>
                <td>${vs.count}</td>
                <td>${stu.number}</td>
                <td>${stu.name}</td>
                <td>${stu.age}</td>
                <td><a  class="btn btn-danger" href="${pageContext.request.contextPath}/DeleteStudentServlet?id=${stu.id}">删除</a>
                <a  class="btn btn-danger" href="${pageContext.request.contextPath}/ToupdateServlet?id=${stu.id}">修改</a></td>
            </tr>
        </c:forEach>


    </table>
</body>
</html>